<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>社区健康平台 - 专业医疗健康服务</title>
    <link href="https://fonts.googleapis.com/css2?family=GrassScriptBT&display=swap" rel="stylesheet">
    <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css">

    <!--    <link rel="stylesheet" href="./css/home.css">-->

    <style>

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Microsoft YaHei', sans-serif;
        }

        :root {
            --primary-color: #1a7bbc;
            --secondary-color: #4CAF50;
            --text-color: #333;
        }

        /* 头部导航 */
        .header {
            background: #fff;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
            position: sticky;
            top: 0;
            z-index: 1000;
        }

        .nav-container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 1rem;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .logo {
            display: flex;
            align-items: center;
            gap: 1rem;
        }

        .logo-placeholder {
            width: 150px;
            height: 50px;
            /* background: var(--primary-color); */
            display: flex;
            align-items: center;
            justify-content: center;
            font-family: 'STXingkai', cursive;
            /* 应用华文行楷字体 */
            /* 应用草书字体 */
            font-size: 1.5rem;
            /* 调整字体大小 */
            color: rgb(45, 43, 43);
            /* 调整字体颜色 */
        }


        .nav-links {
            display: flex;
            gap: 2rem;
        }

        .nav-links a {
            color: var(--text-color);
            text-decoration: none;
            font-weight: 500;
            transition: color 0.3s;
        }

        .nav-links a:hover {
            color: var(--primary-color);
        }

        .mobile-menu-btn {
            display: none;
            background: none;
            border: none;
            font-size: 1.5rem;
        }

        /* 轮播图容器 */
        .banner {
            height: 400px; /* 减小高度 */
            position: relative;
            overflow: hidden;
            border-radius: 12px; /* 添加圆角 */
            box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2); /* 添加阴影 */
            background: linear-gradient(135deg, #8bc6ec 0%, #9599e2 100%); /* 背景渐变 */
            max-width: 1200px; /* 限制最大宽度 */
            margin: 0 auto; /* 居中对齐 */
        }

        /* 轮播图幻灯片 */
        .banner-slide {
            position: absolute;
            width: 100%;
            height: 100%;
            opacity: 0;
            transition: opacity 1s ease-in-out, transform 0.8s ease-in-out;
            transform: scale(1.2); /* 初始放大效果 */
            display: flex;
            justify-content: center;
            align-items: center;
        }

        .banner-slide.active {
            opacity: 1;
            transform: scale(1); /* 恢复正常大小 */
        }

        /* 图片样式 */
        .banner-slide img {
            width: 100%;
            height: 100%;
            object-fit: cover; /* 确保图片覆盖整个区域 */
            border-radius: 12px; /* 继承圆角 */
            transition: filter 0.5s ease-in-out;
        }

        .banner-slide.active img {
            filter: brightness(1); /* 恢复正常亮度 */
        }

        /* 控制按钮 */
        .banner-controls {
            position: absolute;
            top: 50%;
            transform: translateY(-50%);
            width: 100%;
            display: flex;
            justify-content: space-between;
            padding: 0 2rem;
            z-index: 10;
        }

        .banner-arrow {
            background: rgba(0, 0, 0, 0.5); /* 半透明背景 */
            border: none;
            color: white;
            font-size: 2rem;
            width: 50px;
            height: 50px;
            border-radius: 50%;
            cursor: pointer;
            transition: background 0.3s, transform 0.3s;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .banner-arrow:hover {
            background: rgba(0, 0, 0, 0.8); /* 深色背景 */
            transform: scale(1.1); /* 放大效果 */
        }

        /* 指示点 */
        .banner-dots {
            position: absolute;
            bottom: 20px;
            left: 50%;
            transform: translateX(-50%);
            display: flex;
            gap: 10px;
        }

        .banner-dot {
            width: 10px;
            height: 10px;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.7);
            border: none;
            cursor: pointer;
            transition: all 0.3s;
        }

        .banner-dot.active {
            background: #fff; /* 白色高亮 */
            transform: scale(1.5); /* 放大效果 */
        }

        /* 轮播图文字内容 */
        .banner-content {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            color: white;
            text-align: center;
            padding: 2rem;
            background: rgba(0, 0, 0, 0.5); /* 半透明背景 */
            border-radius: 8px;
            max-width: 600px;
            transition: opacity 0.5s ease-in-out;
            opacity: 0;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            backdrop-filter: blur(5px); /* 添加背景模糊效果 */
        }

        .banner-slide.active .banner-content {
            opacity: 1;
        }

        .banner-title {
            font-size: 2rem; /* 减小标题字体 */
            font-weight: bold;
            margin-bottom: 1rem;
            color: #fff; /* 白色字体 */
            text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7); /* 添加文字阴影 */
        }

        .banner-description {
            font-size: 1rem; /* 减小描述字体 */
            color: #fff; /* 白色字体 */
            text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5); /* 添加文字阴影 */
        }


        /* 响应式设计 */
        @media (max-width: 768px) {
            .banner {
                height: 300px; /* 进一步减小高度 */
                max-width: 100%; /* 适应屏幕宽度 */
            }

            .banner-title {
                font-size: 1.5rem;
            }

            .banner-description {
                font-size: 0.9rem;
            }

            .banner-arrow {
                font-size: 1.5rem;
                width: 40px;
                height: 40px;
            }

            .banner-dot {
                width: 8px;
                height: 8px;
            }

            .banner-content {
                padding: 1rem;
            }
        }


        /* 核心服务 */
        .services {
            padding: 4rem 0;
            background: #f8f9fa;
        }

        .service-grid {
            max-width: 1200px;
            margin: 0 auto;
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
            gap: 1.5rem;
            padding: 0 1rem;
        }

        .service-card {
            background: #fff;
            padding: 2rem;
            border-radius: 8px;
            text-align: center;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        }

        .service-icon {
            font-size: 2.5rem;
            color: var(--primary-color);
            margin-bottom: 1rem;
        }

        /* 特色科室 */
        .departments {
            padding: 4rem 0;
        }

        .department-grid {
            max-width: 1200px;
            margin: 0 auto;
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 2rem;
            padding: 0 1rem;
        }

        /* 特色科室部分的链接样式 */
        .department-grid a {
            display: block; /* 确保链接占据整个卡片区域 */
            text-decoration: none; /* 移除下划线 */
            color: inherit; /* 继承父元素颜色（避免默认蓝色） */
        }


        .department-card {
            border: 1px solid #eee;
            border-radius: 8px;
            overflow: hidden;
            transition: transform 0.3s, box-shadow 0.3s; /* 添加过渡效果 */
        }

        .department-card:hover {
            transform: scale(1.05); /* 缩放效果 */
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2); /* 阴影效果 */
        }

        .dept-placeholder {
            height: 200px;
            background-size: cover; /* 使图片覆盖整个背景 */
            background-position: center; /* 图片居中显示 */
            background-repeat: no-repeat; /* 防止图片重复 */
        }

        .card-content {
            padding: 1rem;
        }

        /* 响应式优化 */
        @media (max-width: 1200px) {
            .department-grid {
                grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
            }
        }

        /* 响应式设计 */
        @media (max-width: 768px) {
            .nav-links {
                display: none;
                position: absolute;
                top: 100%;
                left: 0;
                right: 0;
                background: #fff;
                flex-direction: column;
                padding: 1rem;
                box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
            }

            .nav-links.active {
                display: flex;
            }

            .mobile-menu-btn {
                display: block;
            }

            .banner {
                height: 300px;
            }

            .nav-right {
                flex-direction: column;
                margin-top: 1rem;
            }

            .logout-btn {
                width: 100%;
                text-align: center;
            }

            .service-grid {
                grid-template-columns: 1fr 1fr;
            }
        }

        /* 新增样式 */
        .nav-right {
            display: flex;
            align-items: center;
            gap: 2rem;
        }

        .logout-btn {
            background: var(--primary-color);
            color: white;
            padding: 0.5rem 1rem;
            border-radius: 4px;
            transition: opacity 0.3s;
        }

        .logout-btn:hover {
            opacity: 0.9;
        }

        /* 新增图标定义 */
        .fa-user-circle {
            color: #4CAF50;
        }

        /* 家人管理 */
        .fa-clipboard-check {
            color: #FF9800;
        }

        /* 日常报备 */
        .fa-clipboard-list {
            color: #9C27B0;
        }

        /* 预约管理 */
        .fa-comments {
            color: #00BCD4;
        }

        /* 在线咨询 */
        .fa-users {
            color: #E91E63;
        }

        /* 社区论坛 */

        /* 新增颜色定义 */
        .department-card:nth-child(3) .dept-placeholder {
            background: linear-gradient(45deg, #8A2BE2, #4B0082);
            /* 神经科紫色系 */
        }

        .department-card:nth-child(4) .dept-placeholder {
            background: linear-gradient(45deg, #00CED1, #20B2AA);
            /* 外科青绿系 */
        }

        .department-card:nth-child(5) .dept-placeholder {
            background: linear-gradient(45deg, #32CD32, #228B22);
            /* 内科绿色系 */
        }

        /* 响应式优化 */
        @media (max-width: 1200px) {
            .department-grid {
                grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
            }
        }

        /* 添加卡片缩放与阴影效果 */
        .service-card {
            transition: transform 0.3s, box-shadow 0.3s; /* 添加过渡效果 */
        }

        .service-card:hover {
            transform: scale(1.05); /* 缩放效果 */
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2); /* 阴影效果 */
        }

        /* 确保链接占据整个卡片区域，实现点击任意地方均可跳转 */
        .service-card a {
            display: block;
            width: 100%;
            height: 100%;
            text-decoration: none; /* 移除链接下划线 */
            color: inherit; /* 继承父元素颜色 */
        }

        /* 修改包裹卡片的链接样式 */
        .service-grid a {
            display: block; /* 确保链接占据整个卡片区域 */
            text-decoration: none; /* 移除下划线 */
            color: inherit; /* 继承父元素颜色（避免默认蓝色） */
        }


    </style>


</head>

</head>

<body>
<header class="header">
    <nav class="nav-container">
        <div class="logo">
            <div class="logo-placeholder">社区健康平台</div>
        </div>

        <button class="mobile-menu-btn" onclick="toggleMenu()">☰</button>

        <div class="nav-links" id="navLinks">
            <a href="http://localhost:8000/static/home.html" target="_blank">首页</a>
            <a href="#services">健康服务</a>
            <a href="http://localhost:8000/static/Community.html">社区论坛</a>
            <div class="nav-right">
                <a id="goInfo" href="#">个人中心</a>
                <a id="logout" href="#">退出登录</a>
            </div>
        </div>
    </nav>
</header>

<main>

    <!-- 修改后的轮播图模块 -->
    <section class="banner">
        <div class="banner-controls">
            <button class="banner-arrow" id="prevSlideBtn">❮</button>
            <button class="banner-arrow" id="nextSlideBtn">❯</button>
        </div>

        <div id="bannerSlides"></div>

        <div class="banner-dots" id="bannerDots"></div>
    </section>


    <!-- 核心服务 -->
    <section class="services" id="services">
        <div class="service-grid" id="serviceGrid">
            <!-- 动态渲染核心服务模块 -->
        </div>
    </section>

    <!-- 特色科室部分 -->
    <section class="departments">
        <div class="department-grid" id="departmentGrid">
            <!-- 动态渲染特色科室模块 -->
        </div>
    </section>

</main>

<footer style="background: #333; color: white; padding: 2rem; text-align: center;">
    <p>地址：青岛市城阳区铁骑山路78号 电话：010-12345678 急诊热线：120-1234-5678</p>
    <p>© 2025 社区健康平台 版权所有</p>
</footer>

<script>
    $(document).ready(function () {
        document.querySelector('#logout').addEventListener('click', function () {
            document.cookie = 'token=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;';
            window.location.href = 'http://localhost:5173';
        });

        document.querySelector('#goInfo').addEventListener('click', function () {
            window.open('http://localhost:8000/static/PersonalInfo.html', '_blank');
        });

        // 升级后的轮播逻辑
        let currentSlide = 0;
        let autoPlay = true;
        let slideInterval;
        let slides = [];

        // 初始化指示点
        function initDots() {
            const dotsContainer = document.getElementById('bannerDots');
            dotsContainer.innerHTML = ''; // 清空原有指示点
            slides.forEach((_, index) => {
                const dot = document.createElement('button');
                dot.className = 'banner-dot' + (index === 0 ? ' active' : '');
                dot.onclick = () => goToSlide(index);
                dotsContainer.appendChild(dot);
            });
        }

        // 切换幻灯片
        function goToSlide(index) {
            // 暂停自动播放
            autoPlay = false;
            clearInterval(slideInterval);

            slides[currentSlide].classList.remove('active');
            document.querySelectorAll('.banner-dot')[currentSlide].classList.remove('active');

            currentSlide = (index + slides.length) % slides.length;

            slides[currentSlide].classList.add('active');
            document.querySelectorAll('.banner-dot')[currentSlide].classList.add('active');

            // 3秒后恢复自动播放
            setTimeout(() => {
                autoPlay = true;
                slideInterval = setInterval(nextSlide, 3000);
            }, 3000);
        }

        function nextSlide() {
            goToSlide(currentSlide + 1);
        }

        function prevSlide() {
            goToSlide(currentSlide - 1);
        }

        // 启动自动播放
        function startAutoPlay() {
            if (autoPlay) {
                slideInterval = setInterval(nextSlide, 3000);
            }
        }

        // 从 cookie 中获取指定名称的值
        function getCookie(name) {
            const value = `; ${document.cookie}`;
            const parts = value.split(`; ${name}=`);
            if (parts.length === 2) return parts.pop().split(';').shift();
        }

        // 获取核心服务模块数据并动态渲染
        function fetchCoreServices() {
            const token = getCookie('token'); // 从 cookie 中获取 token
            $.ajax({
                url: 'http://localhost:8000/admin/systemMenu/get',
                method: 'GET',
                headers: {
                    'Authorization': `${token}`
                },
                success: function (data) {
                    if (data.code === 200) {
                        renderCoreServices(data.data);
                    } else if (data.code === 119) {
                        console.log(data);
                        console.log(data.code)
                        // 清空cookie
                        document.cookie = 'token=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;';
                        window.location.href = 'http://localhost:5173';
                    } else {
                        console.error('Failed to fetch core services:', data.message);
                    }
                },
                error: function (xhr, status, error) {
                    document.cookie = 'token=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;';
                    window.location.href = 'http://localhost:5173';
                    console.error('Error fetching core services:', error);
                }
            });
        }

        // 在 renderCoreServices 函数中，修改服务卡片的生成逻辑
        function renderCoreServices(coreServices) {
            const $serviceGrid = $('#serviceGrid');
            $serviceGrid.empty(); // 清空原有内容

            coreServices.forEach(service => {
                const $serviceLink = $('<a>').attr('href', `./${service.component}.html`).attr('target', '_blank'); // 创建跳转链接
                console.log(service.component)
                const $serviceCard = $('<div>').addClass('service-card'); // 服务卡片
                $serviceLink.append($serviceCard); // 将卡片添加到链接中

                const $serviceIcon = $('<i>').addClass(`fas fa-${getServiceIcon(service.name)} service-icon`);
                const $serviceName = $('<h3>').text(service.name);
                const $serviceDescription = $('<p>').text(getServiceDescription(service.name));

                $serviceCard.append($serviceIcon, $serviceName, $serviceDescription);

                $serviceGrid.append($serviceLink); // 将链接添加到网格中
            });
        }

        function getServiceIcon(name) {
            switch (name) {
                case '家人管理':
                    return 'user-circle';
                case '家人档案':
                    return 'file-medical';
                case '日常报备':
                    return 'clipboard-check';
                case '体检预约':
                    return 'stethoscope';
                case '在线预约':
                    return 'calendar-check';
                case '预约管理':
                    return 'clipboard-list';
                case '在线咨询':
                    return 'comments';
                case '社区论坛':
                    return 'users';
                default:
                    return 'question';
            }
        }

        function getServiceDescription(name) {
            switch (name) {
                case '家人管理':
                    return '绑定家庭成员信息';
                case '家人档案':
                    return '健康档案云端存储';
                case '日常报备':
                    return '每日健康状态上报';
                case '体检预约':
                    return '视频问诊服务';
                case '在线预约':
                    return '科室医生预约';
                case '预约管理':
                    return '查看/取消预约';
                case '在线咨询':
                    return '实时医患沟通';
                case '社区论坛':
                    return '病友交流平台';
                default:
                    return '未知服务';
            }
        }

        // 获取医生菜单数据并动态渲染
        function fetchDoctorMenus() {
            const token = getCookie('token'); // 从 cookie 中获取 token
            $.ajax({
                url: 'http://localhost:8000/admin/doctorMenu/get',
                method: 'GET',
                headers: {
                    'Authorization': `${token}`
                },
                success: function (data) {
                    if (data.code === 200) {
                        renderDoctorMenus(data.data);
                    } else if (data.code === 119) {
                        // 清空cookie
                        document.cookie = 'token=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;';
                        window.location.href = 'http://localhost:5173';
                    } else {
                        console.error('Failed to fetch doctor menus:', data.message);
                    }
                },
                error: function (xhr, status, error) {
                    document.cookie = 'token=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;';
                    window.location.href = 'http://localhost:5173';
                    console.error('Error fetching doctor menus:', error);
                }
            });
        }

        // 渲染医生菜单到特色科室部分
        function renderDoctorMenus(doctorMenus) {
            const $departmentGrid = $('#departmentGrid');
            $departmentGrid.empty(); // 清空原有内容

            doctorMenus.forEach(menu => {
                const $departmentLink = $('<a>').attr('href', `./ShowDoctors.html?departmentId=${menu.id}`); // 创建跳转链接

                const $departmentCard = $('<div>').addClass('department-card');

                const $deptPlaceholder = $('<div>').addClass('dept-placeholder').css({
                    'background-image': `url(${getImage(menu.name)})` // 使用背景图片
                });
                console.log(getImage(menu.name));

                const $cardContent = $('<div>').addClass('card-content').css({
                    'padding': '1rem'
                });

                const $deptName = $('<h3>').text(menu.name);
                const $deptDescription = $('<p>').text(getDescription(menu.name));

                $cardContent.append($deptName, $deptDescription);
                $departmentCard.append($deptPlaceholder, $cardContent);
                $departmentLink.append($departmentCard); // 将卡片添加到链接中

                $departmentGrid.append($departmentLink); // 将链接添加到网格中
            });
        }

        // 根据科室名称获取图片路径
        function getImage(name) {
            switch (name) {
                case '心血管中心':
                    return 'cardiovascular.jpg'; // 替换为实际图片路径
                case '骨科中心':
                    return 'orthopedics.jpg'; // 替换为实际图片路径
                case '神经科':
                    return './images/y1.png'; // 替换为实际图片路径
                case '外科':
                    return './images/y2.png'; // 替换为实际图片路径
                case '内科':
                    return './images/y3.png'; // 替换为实际图片路径
                default:
                    return 'default.jpg'; // 默认图片路径
            }
        }

        // 根据科室名称获取描述
        function getDescription(name) {
            switch (name) {
                case '心血管中心':
                    return '国际先进诊疗技术';
                case '骨科中心':
                    return '微创手术专家团队';
                case '神经科':
                    return '脑神经疾病精准诊疗';
                case '外科':
                    return '微创手术与创伤修复';
                case '内科':
                    return '慢性病综合管理';
                default:
                    return '社区勤务管理';
            }
        }

        // 获取轮播图数据并动态渲染
        function fetchCarouselImages() {
            const token = getCookie('token');
            $.ajax({
                url: 'http://localhost:8000/admin/carousel',
                method: 'GET',
                headers: {
                    'Authorization': `${token}`
                },
                success: function (data) {
                    if (data.code === 200) {
                        renderCarouselImages(data.data);
                    } else {
                        console.error('Failed to fetch carousel images:', data.message);
                    }
                },
                error: function (xhr, status, error) {
                    console.error('Error fetching carousel images:', error);
                }
            });
        }

        // 渲染轮播图到页面
        function renderCarouselImages(images) {
            const $bannerSlides = $('#bannerSlides');
            $bannerSlides.empty(); // 清空原有内容

            images.forEach((image, index) => {
                const $slide = $('<div>').addClass('banner-slide' + (index === 0 ? ' active' : ''));

                const $img = $('<img>').attr('src', image.path).attr('alt', `Slide ${index + 1} Image`);
                const $content = $('<div>').addClass('banner-content');
                const $title = $('<div>').addClass('banner-title').text(image.name);
                const $description = $('<div>').addClass('banner-description').text('描述内容'); // 这里可以根据实际情况修改

                $content.append($title, $description);
                $slide.append($img, $content);

                $bannerSlides.append($slide);
            });

            // 更新 slides 数组
            slides = document.querySelectorAll('.banner-slide');

            // 重新初始化指示点
            initDots();

            // 重新绑定事件
            document.getElementById('prevSlideBtn').onclick = prevSlide;
            document.getElementById('nextSlideBtn').onclick = nextSlide;

            // 启动自动播放
            startAutoPlay();
        }

        // 初始化
        fetchCarouselImages();
        fetchCoreServices();
        fetchDoctorMenus(); // 新增获取医生菜单数据的调用

        // 点击外部关闭菜单
        document.addEventListener('click', (e) => {
            const nav = document.getElementById('navLinks');
            if (!e.target.closest('.nav-container')) {
                nav.classList.remove('active');
            }
        });

        // 退出登录确认逻辑
        document.querySelector('.logout-btn').addEventListener('click', function (e) {
            e.preventDefault();
            if (confirm('确定要退出登录吗？')) {
                // 实际应调用登出API
                localStorage.removeItem('token');
                window.location.reload();
            }
        });



    });
</script>


<style>

    .ai-assistant {
        position: fixed;
        bottom: 30px;
        right: 30px;
        width: 70px;  /* 增大尺寸 */
        height: 70px;
        background: linear-gradient(
                135deg,
                #ff0000,
                #ff7300,
                #fffb00,
                #48ff00,
                #00ffd5,
                #002bff,
                #7a00ff,
                #ff00c8,
                #ff0000
        );
        background-size: 400% 400%;
        border-radius: 50%;
        cursor: pointer;
        box-shadow: 0 8px 25px rgba(0, 180, 216, 0.4);
        transition: all 0.3s;
        display: flex;
        align-items: center;
        justify-content: center;
        animation:
                gradientFlow 15s linear infinite,
                pulse 2s ease-in-out infinite;
        z-index: 1000;
    }

    .ai-assistant::before {
        content: "AI";
        color: white;
        font-weight: bold;
        font-size: 1.4em;  /* 增大字体 */
        text-shadow:
                0 0 10px rgba(255,255,255,0.8),
                0 2px 4px rgba(0,0,0,0.3);
        letter-spacing: 1px;
    }

    @keyframes gradientFlow {
        0% { background-position: 0% 50% }
        50% { background-position: 100% 50% }
        100% { background-position: 0% 50% }
    }

    @keyframes pulse {
        0% { transform: scale(1); }
        50% {
            transform: scale(1.15);
            box-shadow:
                    0 0 30px rgba(255,255,255,0.6),
                    0 12px 35px rgba(0, 198, 216, 0.8);
        }
        100% { transform: scale(1); }
    }

    .ai-assistant:hover {
        transform: scale(1.25);
        animation-duration: 3s;
        box-shadow:
                0 0 40px rgba(255,255,255,0.8),
                0 15px 45px rgba(0, 198, 216, 0.9);
        filter: brightness(1.2);
    }

    /* 移动端适配 */
    @media (max-width: 768px) {
        .ai-assistant {
            width: 55px;
            height: 55px;
            bottom: 20px;
            right: 20px;
        }
        .ai-assistant::before {
            font-size: 1.1em;
        }
    }
</style>

<div class="ai-assistant" onclick="window.open('./chat.html', '_blank')"></div>



</body>

</html>
